﻿@model IDictionary<string, object>
@{
    ViewBag.Title = "confirm_order";
    Layout = "~/Views/Shared/_Layout1.cshtml";
}
@section Styles
{
    <link href="../../Content/themes/default/order.css" rel="stylesheet" type="text/css" />
    <link href="../../Content/themes/default/confirm_order.css" rel="stylesheet" type="text/css" />
}
@section Scripts
{
    <script src="../../Scripts/jquery/jquery-ui.js" type="text/javascript"></script>
    <script src="../../Scripts/districtselector.js" type="text/javascript"></script>
    <script src="../../Scripts/phonecheck.js" type="text/javascript"></script>
    <script src="../../Scripts/confirm_order.js" type="text/javascript"></script>
}
<div class="main pageWidth grid-c" id="content">
    <div id="cart">
        <div class="flow-steps">
            <ol class="num6">
                <li class="done current-prev"><span class="first">1. 查看购物袋</span></li>
                <li class="current"><span>2. 拍下商品</span></li>
                <li><span>3. 付款到支付宝</span></li>
                <li><span>4. 卖家发货</span></li>
                <li><span>5. 确认收货</span></li>
                <li class="last"><span>6. 评价</span></li>
            </ol>
        </div>
        <div id="address">
            <input name="_tb_token_" value="5F92UzyTFJl" type="hidden">
            <h2>
                确认收货地址 <span class="manage-address"><a href="Member/deliver_address" target="_blank"
                    class="J_MakePoint">管理收货地址</a> </span>
            </h2>
            <ul id="address-list" class="clearfix">
            </ul>
            <div id="temp-address" style="display: block;">
                <div class="container">
                    <button id="J_LabelTemp" for="addrId_temp">
                        使用新地址</button>
                    <div id="J_EmNotice" class="msg max-notice invisible hidden">
                        <p class="attention">
                            地址库已满，新地址无法入库，但本次可用。<a href="Member/deliver_address" target="_blank" title="管理我的收货地址">管理收货地址</a></p>
                    </div>
                    <div class="form" style="display: block">
                        <form id="myAddress" name="mainform">
                        <fieldset>
                            <ul id="J_UlFileds" style="visibility: visible">
                                <li>
                                    <label>
                                        省：</label>
                                    <span><em>*</em>
                                        <ul class="addr-dist">
                                            <li>
                                                <select id="_fm_d_0_pr" name="addrProv">
                                                </select></li>
                                            <li>市：<select id="_fm_d_0_c" name="addrCity"></select></li>
                                            <li>区：<select id="_fm_d_0_a" name="addrDist"></select></li>
                                            <li>
                                                <label for="addrZip">
                                                    邮政编码：</label><em>*</em><input class="text" name="ZipCode" id="addrZip" type="text"></li>
                                            <input id="divisionCode" class="pc:divisionCode" value="" name="AreaCode" type="hidden">
                                        </ul>
                                        <div class="msg">
                                            <p class="error">
                                                请正确选择省市区</p>
                                        </div>
                                    </span></li>
                                <li>
                                    <label for="addrMail">
                                        街道地址：</label>
                                    <span><em>*</em>
                                        <textarea id="addrMail" class="text" cols="110" rows="2" name="Address"></textarea>
                                        <div class="msg">
                                            <p class="error">
                                                请填写街道地址，最少 5 个字，最多不能超过 127 个字</p>
                                        </div>
                                    </span>
                                    <hr>
                                </li>
                                <li>
                                    <label for="addrName">
                                        收货人姓名：</label>
                                    <span><em>*</em>
                                        <input class="text" name="Consignee" id="addrName" type="text">
                                        <div id="J_DivNameErr" class="msg hidden">
                                            <p class="error">
                                                请填姓名，最多不能超过 25 个字</p>
                                        </div>
                                    </span></li>
                                <li>
                                    <label for="addrArea">
                                        电话：</label>
                                    <span>
                                        <input class="text" name="addrArea" id="phoneSection" size="4" type="text">
                                        -
                                        <input class="text" name="addrNum" id="phoneCode" size="12" type="text">
                                        -
                                        <input class="text" name="addrExt" id="phoneExt" size="6" type="text">
                                        <input class="pc:formatPhone" id="formatPhone" value="" name="Tel" type="hidden">
                                        格式：区号 - 电话号码 - 分机号 </span></li>
                                <li>
                                    <label for="addrMobi">
                                        手机：</label>
                                    <span>
                                        <input class="text" name="Phone" id="mobilePhone" type="text">
                                        电话和手机请至少填写一个
                                        <div class="msg">
                                            <p class="error">
                                                必须由数字和 - 组成，总长度不能超过 25 位；且电话和手机至少填写一项</p>
                                        </div>
                                    </span></li>
                            </ul>
                            <div class="go">
                                <span class="skin-blue">
                                    <button name="submitButton" type="button" onclick="createOrUpdate()" class="long-btn">
                                        确定</button></span> <span class="skin-gray">
                                            <button name="resetButton" type="reset" class="short-btn">
                                                取消</button></span>
                            </div>
                        </fieldset>
                        </form>
                    </div>
                    <a href="#" class="cancel" title="关闭" id="J_LinkCancel"><span>关闭</span></a>
                </div>
            </div>
            <div class="addr-more-con">
                <span id="more-addresses" class="J_MakePoint">显示全部地址</span>
            </div>
            <a style="display: inline-block;" id="J_TopBacktoCart" target="_top" class="back J_MakePoint"
                href="Order/myCart">返回天猫购物袋修改 </a>
            <input id="buy_param" value="" type="hidden">
        </div>
    </div>
</div>
<div id="goods">
    <form id="J_Form" name="J_Form" action="order_result" method="post" target="_self">
    <div id="goods-list">
        
        <h2>
            确认订单信息</h2>
     
      
        <input id="J_encryptString" name="encryptString" value="@ViewData["encryptString"]"
            type="hidden">
       
        <input id="J_cartIds" name="cartIds" value=" @ViewData["cartids"]"
            type="hidden">
       
      
        <input id="J_DeliverId" name="deliverId" value="" type="hidden">
       
        <input value="" name="deliverName" id="J_Addr_deliverName" type="hidden">
        <input value="" name="deliverMobile" id="J_Addr_deliverMobile" type="hidden">
        <input value="" name="deliverCode" id="J_Addr_deliverCode" type="hidden">
        <input value="" name="deliverAddr" id="J_Addr_deliverAddr" type="hidden">
        <input value="" name="postCode" id="J_Addr_postCode" type="hidden">
    
        <div id="J_OrderContainer">
            <div>
                <table id="order-table" class="order-table" cellpadding="0" cellspacing="0">
                    <tbody class="J_Shop the-last-shop">
                        @if ((List<Enter.Mvc.Mall.Model.Order.MyCart>)Model["Valid"] != null)
                        {
                            foreach (var shop in (List<Enter.Mvc.Mall.Model.Order.MyCart>)Model["Valid"])
                            {
                                var count = 0;
                            <tr class="shop-hd">
                                <th class="s-title">
                                    <a href="/shop/view_shop.htm?shop_id=@shop.ShopNO" class="J_ShopName"
                                            target="_blank" title="@shop.ShopName">店铺：@shop.ShopName </a><span class="J_WangWang ww-small"
                                                data-nick="@shop.ShopName" data-display="inline"></span>
                                    <hr>
                                </th>
                                <th class="s-price">
                                    单价(元)<hr>
                                </th>
                                <th class="s-amount">
                                    数量<hr>
                                </th>
                                <th class="s-agio">
                                    优惠方式<hr>
                                </th>
                                <th class="s-total">
                                    小计(元)<hr>
                                </th>
                                <th class="s-ship">
                                    配送方式<hr>
                                </th>
                            </tr>
                                                      decimal total = 0;
                                                      foreach (var prod in shop.Product)
                                                      {

                                                          decimal amount = prod.OPRICE * prod.ONUM;
                                                          total += amount;
                            <tr class=" item   ">
                                <td class="s-title">
                                    <a class="item-name" href="/Detail/item?id=@prod.GID" target="_blank">
                                        <img src="@prod.SmallImgUrl" class="itempic">@prod.Title</a>
                                    @if (!string.IsNullOrEmpty(prod.Color))
                                    {
                                        <span>主要颜色:<em>@prod.Color</em></span>
                                    }
                                    @if (!string.IsNullOrEmpty(prod.Size))
                                    {
                                        <span>尺码:<em>@prod.Size</em></span>
                                    }
                                </td>
                                <td class="s-price ">
                                    <em class="J_Price">@prod.OPRICE.ToString("f2")</em>
                                </td>
                                <td class="s-amount  J_ModAmount_21428276234_0 ">
                                    <span>@prod.ONUM</span>
                                </td>
                                <td class="s-agio" id="J_ModPromo_21428276234_0">
                                    -
                                </td>
                                <td class="s-total ">
                                    <em class="J_Sum" id="J_Sum_21428276234_0">@amount.ToString("f2")</em>
                                </td>
                                @if (count == 0)
                                {
                                    <td class="s-freight" id="J-Postage-@shop.ShopNO" rowspan="@shop.Product.Count">
                                    </td>
                                     
                                }
                            </tr>
                                count++;
                                                      }
                            <tr class=" s-shop-otherinfo">
                                <td colspan="6">
                                    <div class="gbook  ccc ">
                                        <label class="gbook-title" for="@shop.ShopNO|memo">
                                            补充说明：</label>
                                        <textarea class="off J_GbookInput" id="@shop.ShopNO|memo" name="@shop.ShopNO|memo" autocomplete="off"
                                                title="选填，可告诉卖家您对订单的特殊要求。"></textarea>
                                        <span class="gbook-span">选填，可告诉卖家您对订单的特殊要求。</span></div>
                                    <div class="promo-and-total">
                                        <div class="promo">
                                            店铺优惠：<span id="J_ModPromo_21428276234"> <span class="J_BundleList">
                                                <select name="bundleList_21428276234">
                                                    <option value="0">-</option>
                                                    <option value="mjs-356060330_37058778" selected="selected" data-bundle="mjs-356060330_37058778"
                                                        data-discount="0">全场满299包邮</option>
                                                </select>
                                            </span><span class="J_Desc msg-bundle " data-desc="&lt;ul&gt;&lt;li&gt;全场满299包邮：包邮&lt;/li&gt;&lt;/ul&gt;">
                                            </span><span class="promo-discount">-<em class="J_PromoDiscount">0.00</em></span>
                                            </span>
                                        </div>
                                        <div class="order-total">
                                            店铺合计(含运费)：<em class="total J_ShopTotal J_Sum" id="J_Total-@shop.ShopNO">@total.ToString("f2")</em>
                                        </div>
                                        <div class="promo-list ">
                                            <div class="scrolling-container" style="position: relative;">
                                                <ul style="position: absolute;" class="scrolling-promo-hint J_ScrollingPromoHint">
                                                    <li style="display: block;" title=" 满299元,免运费">满299元,免运费 </li>
                                                </ul>
                                            </div>
                                        </div>
                                    </div>
                                    <input name="21428276234|codRank" id="codRank_21428276234" value="" type="hidden">
                                </td>
                            </tr>

                            }
                        }
                    </tbody>
                </table>
            </div>
        </div>
    </div>
    <div style="display: block;" class="J_PromoCombo submit-info" data-order="cross_id">
        @*<div style="display: block;" class="point-out">
            商城积分：使用<input name="costPoint" class="text" value="0" id="J_PointsToUse" autocomplete="off"
                type="text">点<em>(共有<em id="J_AvailablePoints">153</em>点)</em> <span class="discharge">
                    -<strong id="J_Discharge">0.00</strong></span>
            <input id="J_MaxUsablePoints" value="153" type="hidden">
        </div>*@
        <div class="point-in">
            <span id="J_TotalTitle">实付款：</span> <strong id="J_Total" class="J_Sum"></strong>
            <br>
            <span>可获得商城积分：</span> <em id="J_TotalPoints" class="J_Point">360</em> 点
        </div>
        <div class="go-handle">
            <div class="clearfix">
            </div>
            <div class="order-go">
                <a style="display: inline-block;" id="J_BacktoCart" target="_top" class="back J_MakePoint"
                    href="myCart">返回天猫购物袋修改 </a>
                <button type="submit" id="J_go" class="J_MakePoint">
                    确认无误，购买</button>
            </div>
        </div>
    </div>
    <div style="display: block;" id="unable-buy" class="unable-buy">
        <div class="title">
            以下宝贝已不能购买<a href="http://service.taobao.com/support/help-11228.htm" target="_blank"
                class="hidden">什么原因</a>
        </div>
        <div id="J_UnableContainer">
            <table class="order-table order-table-unable" cellpadding="0" cellspacing="0">
                <colgroup valign="middle">
                    <col width="350">
                    <col width="350">
                    <col width="140">
                    <col width="120">
                    <col>
                    <col width="140">
                </colgroup>
                <tbody>
                    @if ((List<Enter.Mvc.Mall.Model.Order.MyCart>)Model["NoValid"] != null)
                    {
                        foreach (var shop in (List<Enter.Mvc.Mall.Model.Order.MyCart>)Model["NoValid"])
                        {
                        <tr class="shop">
                            <td colspan="3">
                                店铺：<a class="J_ShopName J_MakePoint" target="_blank" href="/shop/view_shop.htm?shop_id=@shop.ShopNO">@shop.ShopName</a>
                                <em class="icon"><span class="seller">卖家：<a href="#;" target="_blank" class="J_MakePoint">@shop.ShopName</a></span>
                                    <span class="J_WangWang"
                                                data-nick="@shop.ShopName" data-display="inline"></span>
                            </td>
                            <td colspan="2" class="promo">
                                <div>
                                </div>
                            </td>
                        </tr> 
                                                      foreach (var prod in shop.Product)
                                                      {
                                
                        <tr class="item">
                            <td class="s-title">
                                <a href="/Detail/item?id=@prod.GID" target="_blank" title="">
                                    @prod.Title</a> <a title="" class=""></a>
                                @if (!string.IsNullOrEmpty(prod.Color))
                                {
                                    <span>主要颜色:<em>@prod.Color</em></span>
                                }
                                @if (!string.IsNullOrEmpty(prod.Size))
                                {
                                    <span>尺码:<em>@prod.Size</em></span>
                                }
                            </td>
                            <td class="s-price">
                                <span class="price"><em class="style-normal-small-black   J_ItemPrice">@prod.OPRICE.ToString("f2")</em></span>
                            </td>
                            <td class="s-amount">
                                @prod.ONUM
                            </td>
                            <td class="s-agio">
                                <em tabindex="0">@prod.Msg</em>
                            </td>
                            <td class="s-total">
                                <span class="price"><em class="style-normal-bold-red   J_ItemTotal"></em></span>
                            </td>
                        </tr>
                                                      }
                        }
                    }
                </tbody>
            </table>
        </div>
    </div>
    </form>
</div>
